package com.net.all.testing;

import java.util.Scanner;

class Runner extends Thread
{
    private boolean  isStop = true;
	
	public void run() 
	{
		while(isStop)
		{
			
		 System.out.println("hello  ");
		 
		 try {
			 
			 Thread.sleep(1000);
			
		} catch (Exception e) {
			// TODO: handle exception
		}
			
		}
		
	}
	
  public void isValue()
  {
	  isStop = false;
  }

	
	
}

public class TestDemo {

	
public static void main(String[] args)
	{
	 
	  Runner t1 = new  Runner();
	  t1.start();
	  
	  System.out.println("Print return to stop..........");
	  Scanner in = new Scanner(System.in);
	  
	  in.nextLine();
	  
	 
	  
	 
	  t1.isValue();
	
	}

}
